<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/regist.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script src="/js/plugins/js-cookie/js.cookie.min.js"></script>
    <script src="/js/vue/md5.js"></script>
    <script type="text/javascript" src="/js/vue/common.js"></script>
    <script type="text/javascript" src="/js/system/regist.js"></script>

</head>
<body>
<script>
    $(function () {
        /*ajaxGet("/currentUser", {}, function (data) {
            console.log(data);
        })*/

       /* ajaxGet("/travel/info", {}, function (data) {
            console.log(data, 1);
        })

        ajaxGet("/travel/userUpdate", {}, function (data) {
            console.log(data, 2);
        })
*/
        //自己封装的
        /*ajaxGet("/test1", {aa:1, bb:2, cc:3}, function (data) {
            console.log(data, 2);
        })*/
        //第二次发送请求(已经帮我们写完了)
        /*$.ajax({
            url:domainUrl+"/users/currentUser",
            type:"GET",
            data:{},
            //在请求发起前,把token放在请求头里
            beforeSend:function (xhr) {

                //xhr:ajax对象
                var token = getToken();
                //设置请求头
                xhr.setRequestHeader("token",token);
            },
            success:function (data) {
                console.log(data);
            }
        });*/
        //自己封装的方法(第二次发送请求)
        /*ajaxGet("/users/currentUser", {}, function (data) {
            console.log(data);
        })*/
        //测试参数解析器
        /*ajaxGet("/travels/getUser",{},function (data) {
            console.log(data);
        })*/
        /*ajaxGet("/travels/updateUser",{nickname:"xuesong"},function (data) {
            console.log(data);
        })*/
        // 防刷功能测试
        /*ajaxGet("/test1",{nickname:"xuesong"},function (data) {
            console.log(data);
        })*/
        //参数防篡改: 请求:aa=1 bb=2,cc=3,dd=4
        ajaxGet("/test2",{aa:1,bb:2,cc:3,dd:4},function (data) {
            console.log(data);
        })
    })

</script>



</body>
</html>